﻿//-----------------------------------------------------------------------
// <copyright file="IAlgorithm.cs" company="Luboš Bretschnieder">
// Copyright (c) 2008 Luboš Bretschnieder, Licensed under the Apache License, Version 2.0.
// </copyright>
//-----------------------------------------------------------------------
namespace Graphs.Algorithms
{
    using System.Collections.Generic;

    /// <summary>
    /// Common interface for algorithms
    /// </summary>
    public interface IAlgorithm
    {
        /// <summary>
        /// Sets the graph.
        /// </summary>
        /// <value>The graph.</value>
        Graph Graph { set; }

        /// <summary>
        /// Gets the steps of the algorithm execution.
        /// </summary>
        /// <value>The steps.</value>
        List<AlgorithmStep> Steps { get; }

        /// <summary>
        /// Executes the algorithm.
        /// </summary>
        void Execute();

        /// <summary>
        /// Executes the algorithm starting in specified vertex.
        /// </summary>
        /// <param name="vertexName">Name of the vertex.</param>
        void Execute(string vertexName);

        /// <summary>
        /// Resets the algorithm (normally should be called when executing algorithm).
        /// </summary>
        void Reset();
    }
}
